package com.jic.member.enums;

/**
 * @author yinmenghui
 *  消耗类型对比
 */

public enum CONSUME_CODE {
    ORDER("1","消费抵现"),
    GIVE("2","兑换优惠券"),
    COUPON("3","兑换红包"),
    EVALUATE("4","兑换产品功能"),
    RECHARGE("5","兑换付费内容"),
    CANCEL("6","取消订单"),

    ;
    private String code;
    private String message;

    CONSUME_CODE(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static CONSUME_CODE getByCode(String code) {
        CONSUME_CODE[] values = CONSUME_CODE.values();
        for (CONSUME_CODE value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}